package com.zr.inquiry.model;

/**
 * Created by denghaigen on 2019/1/4.
 */
public enum EnumInquiryType {
    RED("采购询价", 0), GREEN("处理询价", 1), BLANK("报废询价", 2);
    // 成员变量
    private String name;
    private int index;
    // 构造方法
    private EnumInquiryType(String name, int index) {
        this.name = name;
        this.index = index;
    }
    // 普通方法
    public static String getName(int index) {
        for (EnumInquiryType c : EnumInquiryType.values()) {
            if (c.getIndex() == index) {
                return c.name;
            }
        }
        return null;
    }
    // get set 方法
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    public int getIndex() {
        return index;
    }
    public void setIndex(int index) {
        this.index = index;
    }
}
